#version 330 core
layout (location = 0) in vec3 a_vertex;
layout (location = 1) in vec4 a_color;
layout (location = 2) in vec2 a_uv;
layout (location = 3) in vec3 a_normal;
uniform bool use_vertex_color;
uniform vec4 base_color;
uniform float u_pointSize;
uniform mat4 u_mvp;
uniform mat4 u_view;
uniform mat4 u_model;
out vec4 v_color;
out vec2 v_uv;
out vec3 v_normal;
void main(){
    gl_Position = u_mvp * vec4(a_vertex, 1.0f);
    gl_PointSize = u_pointSize;
    if(use_vertex_color){
        v_color = a_color;
    }else{
        v_color = base_color;
    }

    v_uv = a_uv;
    v_normal = a_normal;
}